package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bean.OrderBean;
import com.project.bean.ShopBean;
import com.project.service.IProductService;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;


@Mapper
@Repository
public interface IOrderMapper extends BaseMapper<OrderBean> {

    /**
     * 添加订单明细
     * @param orderId 订单ID
     * @param shopList 购物车集合
     */
    public void addOrderInfo(@Param("orderId") int orderId,
                             @Param("shopList") List<ShopBean> shopList);

    public OrderBean findByOrderInfo(int orderId);

}